package org.example.spring.carsalemanagementsystem.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.spring.carsalemanagementsystem.entity.Commodity;
import org.example.spring.carsalemanagementsystem.entity.Client;
import org.example.spring.carsalemanagementsystem.vo.CommodityFuzzyVo;
import org.example.spring.carsalemanagementsystem.vo.CommodityVo;

import java.util.List;

@Mapper
public interface CommodityDao {
    void deleteById(@Param("carid") String carid);
    void insertOne(Commodity commodity);
    void updateById(Commodity commodity);
    List<Commodity> findPages(@Param("pageNum") Long pageNum, @Param("pageSize") Long pageSize);//分页查询所有
    List<Commodity> findPagesByKey(CommodityFuzzyVo vo);//模糊查询
    Long count(); //返回记录条数
    Long countByKey(CommodityFuzzyVo vo);//查询符合条件的条数
    Client selectById(@Param("carid") String carid);
    List<CommodityVo> findList();
    List<CommodityVo> findListByKey(@Param("key") String key);
}
